import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询记录列表
export function list(query) {
  return request({
    url: '/wxchat/record/list',
    method: 'get',
    params: query
  })
}

// 查询记录详细
export function getRecord(recordId) {
  return request({
    url: '/wxchat/record/' + parseStrEmpty(recordId),
    method: 'get'
  })
}

// 新增记录
export function addRecord(data) {
  return request({
    url: '/wxchat/record',
    method: 'post',
    data: data
  })
}

// 修改记录
export function updateRecord(data) {
  return request({
    url: '/wxchat/record',
    method: 'put',
    data: data
  })
}

// 删除记录
export function delRecord(recordId) {
  return request({
    url: '/wxchat/record/' + recordId,
    method: 'delete'
  })
}

// 通过患者ID查询记录
export function getRecordByUserId(userId) {
  return request({
    url: '/wxchat/record/getRecordByUserId/' + userId,
    method: 'get'
  })
}

// 通过患者ID和状态查询记录
export function getRecordByUserIdAndState(query) {
  return request({
    url: '/wxchat/record/getRecordByUserIdAndState',
    method: 'get',
    params: query
  })
}

// 审核患者信息
export function auditRecordInfo(param) {
  return request({
    url: '/wxchat/record/auditRecordInfo',
    method: 'get',
    params: param
  })
}

// 处理患者信息
export function processRecordInfo(param) {
  return request({
    url: '/wxchat/record/processRecordInfo',
    method: 'get',
    params: param
  })
}
